/*

NTP MODULE

Copyright (C) 2016-2019 by Xose Pérez <xose dot perez at gmail dot com>
Copyright (C) 2019-2021 by Maxim Prokhorov <prokhorov dot max at outlook dot com>

*/

#pragma once

#include <Arduino.h>
#include <ctime>

enum class NtpTick {
    EveryMinute,
    EveryHour
};

using NtpTickCallback = void(*)(NtpTick);
void ntpOnTick(NtpTickCallback);

String ntpDateTime();
bool ntpSynced();

void ntpSetup();
